<?php
/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
*/

/**
 * Description of Controller
 *
 * @author gaurav
 */

include_once '../include.php';


if(isset ($_GET["action"])) {
    $action =  $_GET["action"];
}


if(isset ($_POST["action"])) {
    $action =  $_POST["action"];
}







switch ($action) {

    case "getState":  $reg =  new RegistrationUtility();
        $reg->getStateDD();
        break;

    case "getCity" :   $regCity =  new RegistrationUtility();
        $state = $_POST["state"];
        $regCity->getCity($state);
        break;

    case "registrationConfirmation": echo "form submit";

        $fname       =  $_POST['fname'];
        $lname       =  $_POST['lname'];
        $email       =  $_POST['email'];
        $password     = $_POST['password'];
        $mobile       = $_POST['mobile'];
        $country     = $_POST['country'];
        $state      = $_POST['state'];
        $city       = $_POST['city'];
        echo $password."<br/>";
        $regSave = new RegistrationUtility();
        $regSave->SaveRegistraion($fname, $lname, $password, $country, $state, $city, $email, $mobile);
        break;
}
?>
